home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
LOGIC Apps
/
Logic-APPLE_II_APPS.iso
/
pc
/
LOGIC Apple II 5.25" Library - DOS Part 3
/
DOS077A.dsk
/
SHAPE MAKER.int
< prev
next >
Wrap
Text File
|
2012-02-16
|
5KB
|
125 lines
1 LOMEM:3072
2 GOSUB 10000
5 GR :COLOR= 4:X=20:Y=20:DIM A(110):DIM B(110):DIM Z$(1):D=0
6 PRINT "TYPE Q TO QUIT DRAWING SHAPE":PRINT "TO ENSURE # IS LESS THAN 110":PRINT " TO ERASE HOLD PADDLE BUTTON PRESSED"
10 PLOT X,Y
15 POKE -16368,0
20 KEY= PEEK (-16384):IF KEY>127 THEN 30
25 GOTO 20
30 IF KEY=213 THEN Y=Y-1
35 IF KEY=196 THEN Y=Y+1
40 IF KEY=210 THEN X=X+1
45 IF KEY=204 THEN X=X-1
50 IF KEY=209 THEN 70
55 IF PEEK (-16287)<=127 THEN COLOR= 15:IF PEEK (-16287)>127 THEN COLOR= 4
59 IF SCRN(X,Y)=15 THEN F=F-1
60 PLOT X,Y
61 IF SCRN(X,Y)=15 THEN F=F+1
64 TAB 13:VTAB 22:PRINT F
65 GOTO 15
70 POKE -16368,0
74 PRINT
75 INPUT "PLEASE TYPE LETTER KEY OF SHAPE DRAWN ",Z$
76 PRINT "APPLE IS NOW SCANNING SHAPE"
80 L= ASC(Z$)*10
85 FOR X=0 TO 39:FOR Y=0 TO 39:IF SCRN(X,Y)=15 THEN GOSUB 100
90 NEXT Y,X
95 TEXT :GOTO 130
100 A(C)=X:B(C)=Y
120 C=C+1:RETURN
130 L=L-1:CALL -936:CV=2:CH=1
140 IF C>55 THEN GOTO 150
145 GOTO 160
150 L=L+6:D=55:GOTO 170
160 L=L+1
170 TAB (CH):VTAB (CV):PRINT " ";L
175 CH=CH-5
180 IF C=D THEN GOTO 600
200 IF D MOD 11=10 THEN 250
210 IF (C-1)=D THEN GOTO 250
215 CH=CH+11:IF (CH+11)>40 THEN GOSUB 500
219 PRINT
220 TAB (CH):VTAB (CV):PRINT "PLOT ";A(D);",";B(D);":"
230 D=D+1
240 GOTO 200
250 CH=CH+11:IF (CH+11)>40 THEN GOSUB 500
260 TAB (CH):VTAB (CV):PRINT "PLOT ";A(D);",";B(D)
270 D=D+1:CV=CV+1:CH=1
280 IF D<110 THEN GOTO 160
290 PRINT "TOO MUCH DATA":END
298 TAB 7:VTAB CV:PRINT "RETURN"
299 IF F<56 THEN 301
301 VTAB 22:PRINT "RUN '->' TO END OF LINE # AND HIT RETURN":TAB 1:VTAB 1
304 END
400 REM SUBROUTINE TO CHANGE LAST LINES WHEN PAGES FILL
405 IF F=109 THEN GOTO 450
410 TAB 1:VTAB CV:PRINT " "
415 TAB 1:VTAB CV:PRINT ":RETURN"
430 RETURN
450 TAB 12:VTAB 21:PRINT ":RETURN":PRINT " ":RETURN
500 CV=CV+1:CH=1
502 RETURN
600 IF C<56 THEN GOTO 298
601 TAB 7:VTAB CV:PRINT "RETURN":VTAB 22
602 PRINT "RUN '->' TO END OF LINE# AND HIT RETURN"
603 IF F>99 THEN GOSUB 400
605 POKE 60,0: POKE 61,4: POKE 62,255: POKE 63,7: POKE 66,0: POKE 67,8:CALL -468
620 CALL -936
630 L=(( ASC(Z$)*10)-1)
635 VTAB 1
636 PRINT "FOR PAGE 2 TYPE 'RUN 700' "
638 VTAB 22:PRINT " "
640 CV=2:CH=1
650 D=0:C=55
690 GOTO 160
700 TAB 1:VTAB 1
705 POKE 60,0: POKE 61,8: POKE 62,255: POKE 63,11: POKE 66,0: POKE 67,4:CALL -468
710 GOTO 304
900 GR :COLOR= RND (14)+1
901 PRINT :PRINT :PRINT :PRINT :PRINT
905 INPUT "TYPE KEY OF SHAPE TO BE DISPLAYED ",Z$
910 L= ASC(Z$)*10:GOSUB L
950 PRINT "TO DRAW A NEW SHAPE TYPE 'RUN', TO DISPLAY A SHAPE ALREADY MADE TYPE 'RUN 900' "
960 END
970 REM PROGRAM BY BILL SMITH
980 REM GAMBIER ISLAND B.C.
990 REM CANADA
991 REM CREATIVE COMPUTING JUNE 1980 PAGE 146
992 REM TYPED BY WM.J.KERR SR
9999 END
10000 REM TEXT INSTRUCTIONS OF USE OF PROGRAM
10010 TEXT :CALL -936:VTAB 8:TAB 11:PRINT "** INSTRUCTIONS **"
10020 PRINT :TAB 10:PRINT "LOW-RES SHAPE MAKER"
10030 PRINT :PRINT :TAB 10:PRINT "** BY W. B. SMITH **"
10040 FOR D=1 TO 3000:NEXT D
10100 TEXT :CALL -936
10200 VTAB 5:PRINT " THIS PROGRAM WAS WRITTEN TO ALLOW THE USER TO CREATE SHAPES ON THE LOW ";
10210 PRINT "RESOLUTION GRAPHICS SCREEN AND THEN ALLOW THE COMPUTER TO WRITE THE LABOR- ";
10220 PRINT "IOUS SERIES OF PLOTS REQUIRED TO DEFINE THE SHAPE."
10230 PRINT " IF YOU HOLD IN THE BUTTON ON PDL #1AND THEN PRESS THE L(LEFT), R(RIGHT), ";
10240 PRINT "U(UP), D(DOWN) KEYS THE GREEN SPOT CAN BE MOVED ANYWHERE ON THE SCREEN WITHOUT ";
10250 PRINT "PLOTTING THE POINTS. WHEN YOU HAVE THE GREEN POINT AT THE LOCATION YOU WISH TO ";
10260 PRINT "START THE SHAPE, RELEASE THE BUTTON ON PDL #1. NOW PRESSING L,R,U OR D WILL ";
10270 PRINT "PLOT A WHITE SQUARE."
10280 PRINT :TAB 9:INPUT "TO CONTINUE HIT RETURN",A$
10290 TEXT :CALL -936
10300 VTAB 5:PRINT " IF YOU WISH TO ERASE A SPOT JUST GOOVER IT IN GREEN (HOLD THE BUTTON IN ON ";
10310 PRINT "PDL #1). WHEN THE COMPUTER GOES OVER THEDESIGN IT WILL ONLY PLOT THE WHITE POINT";
10320 PRINT "THE MAXIMUM NUMBER OF SPOTS ALLOWED IN ASHAPE IS 109 AND THE COUNTER KEEPS TRACK";
10330 PRINT " WHEN YOU'RE FINISHED TYPE Q (FOR QUIT) AND THE APPLE WILL ASK YOU FOR A ";
10340 PRINT "KEY NAME (ANY LETTER FROM A TO Z). NOW APPLE WILL WRITE LINE NUMBERS AND PLOT ";
10350 PRINT "STATEMENTS ON THE SCREEN. TO STORE THIS SUBROUTINE JUST USE THE RIGHT ARROW AND ";
10360 PRINT "REPEAT KEYS TO MOVE THE CURSOR TO THE END OF THE LINE AND HIT RETURN."
10370 PRINT :TAB 9:INPUT " TO CONTINUE HIT RETURN",A$
10375 TEXT :CALL -936
10380 VTAB 5:PRINT " IF THE SHAPE HAS MORE THAN 55 DOTS,AFTER STORING THE FIRST PAGE, TYPE RUN ";
10390 PRINT "700 AND THE SECOND PAGE WILL BE READY FOR THE RIGHT ARROW TREATMENT. TO CHECK ";
10400 PRINT "THE SHAPE TYPE RUN 900 AND ANSWER THE QUESTIONS. TYPE RUN TO START A NEW SHAPE";
10420 PRINT " THE SHAPES ARE NOW PART OF THIS PROGRAM AND STORED AS SUBROUTINES START-";
10430 PRINT "ING AT A LINE NUMBER THAT IS 10 TIMES THE ASC VALUE FOR THE KEY LETTER USED TO";
10440 PRINT "STORE THE SHAPE--I.E. A WOULD BE AT 193 * 10 OR 1930. IF YOU FINISH MAKING ";
10450 PRINT "SHAPES JUST TYPE DEL 1,999 AND THEN DEL 10000,10500 AND THAT WILL LEAVE ONLY THE";
10460 PRINT "PLOTTING LINES FOR YOUR SHAPE IN MEMORY."
10470 PRINT :TAB 9:INPUT "TO CONTINUE HIT RETURN",A$
10480 TEXT :CALL -936:RETURN